<!-- 设备管理-基础设置页面 -->
<template>
  <px-tabs v-model="activeName" class="equipment-tabs" @tab-click="handleTabClick">
    <px-tab-pane v-for="(item, index) in tabList" :key="index" :name="item?.name">
      <template #label>
        <p class="pane-bottom">{{ item?.label }}</p>
        <p class="pane-line" />
      </template>
    </px-tab-pane>
  </px-tabs>
</template>
<script lang="ts" setup>
import { defineEmits, ref, watch } from "vue";
defineOptions({
  name: "CommonEquipSetting"
});
const props = defineProps({
  tabList: {
    type: Array,
    required: true,
    default: () => []
  }
});
const emit = defineEmits(["tabSelect"]);

const activeName = defineModel("activeName");
const handleTabClick = (tab, event) => {
  emit("tabSelect", tab.paneName);
};
</script>
